package com.springmvc.crud.handler;

import com.springmvc.crud.dao.DepartmentDao;
import com.springmvc.crud.dao.EmployeeDao;
import com.springmvc.crud.entity.Employee;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Map;

/**
 * Created by BF100233 on 2016/8/23.
 */
@Controller
public class EmployeeHandler {

    @Autowired
    private EmployeeDao employeeDao;

    @RequestMapping("emps")
    public String list(Map<String,Object> map){
       System.out.println(employeeDao.getAll());
        map.put("employees", employeeDao.getAll());
        return "list";
    }


}
